-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make MutexPool an allocator #2766
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✔️ d72251f -> Azure artifacts URL |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2766 +/- ##
==========================================
- Coverage 67.15% 67.14% -0.01%
==========================================
Files 562 561 -1
Lines 104118 104073 -45
==========================================
- Hits 69923 69885 -38
+ Misses 34195 34188 -7 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
✔️ 4a12b57 -> Azure artifacts URL |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✔️ 2b1719a -> Azure artifacts URL |
This comment has been minimized.
This comment has been minimized.
✔️ 0936bef -> Azure artifacts URL |
This comment has been minimized.
This comment has been minimized.
Quality Gate passedIssues Measures |
✔️ cc18266 -> Azure artifacts URL |
Move
structpool.h
toutils/pool.hpp
Move
nrncvode/pool.h
inutils/mutexed_pool.hpp
.The new pools is neuron-agnostic (hoc, ...).
To create a normal pool:
Pool<int>
To create a pool protected with mutex:
MutexedPool<int>
, the type of the mutex can be given as a second optional argument (by default std::mutex)MutexedPool<int, std::recursive_mutex>
To follow https://en.cppreference.com/w/cpp/named_req/Allocator:
alloc
toallocate
hpfree
todeallocate
The function to clean the data has to be set with
set_function
it lets us, use a different name, a lambda, a free function, ... compare to before where the function should be part of the type and namedclear()
.